clear all
close all

%root = "/home/kamil/magisterka/workspace/mgr_tests/Debug";
root="/media/d/mgr_wyniki";
%resultsDir = "00_test_results";
%resultsDir = "01_y_ABC_b_ABC.sh_results"
%resultsDir="02_y_none_b_ABC.sh_results"
%resultsDir="03_y_A_b_ABC.sh_results"
%resultsDir="04_y_B_b_ABC.sh_results"
%resultsDir="05_y_C_b_ABC.sh_results"
%resultsDir="06_y_AB_b_ABC.sh_results"
%resultsDir="07_y_AC_b_ABC.sh_results"
resultsDir="08_y_BC_b_ABC.sh_results"
%resultsDir="11_y_none_b_none.sh_results"

dirName = [root "/" resultsDir];

[yellowStatsExp, blueStatsExp] = parseExperiments(dirName)

% reading the result.txt files
resultFile = [dirName "/results.txt"];
 [winYellow, winBlue, draws, avgGoalsYellow, avgGoalsBlue] = parseResultFile(resultFile)

printf("\n** Wins yellow: %d, wins blue: %d, draws: %d **\n\n", winYellow, winBlue, draws);

printf("przechwycenia piłki|%.3f|%.3f\n", yellowStatsExp(3), blueStatsExp(3));
printf("celne podania|%.3f|%.3f\n", yellowStatsExp(2), blueStatsExp(2));
printf("strzały|%.3f|%.3f\n", yellowStatsExp(1), blueStatsExp(1));
printf("zdobyte bramki|%.3f|%.3f\n", avgGoalsYellow, avgGoalsBlue);

plotResultsGoalsHistogram(resultFile)

% y 	wygrane
% b 	wygrane gole strzaly podania przechwyty
% remis

%h = bar([1:5],test);
%set(gca,'XTick',[1:5]);
%set(gca,'xticklabel',["wygrane","gole","strzaly"; "podania"; "przechwyty"]);
%set(h(1), "facecolor", "y")
%set(h(2), "facecolor", "b")
%text(1,20,'aaa');